test(diagnostic_bridge): label test_integration as an integration test#443
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates ros2_medkit_diagnostic_bridge’s launch test registration so the package’s integration launch test can be excluded from the unit-test phase and only run when integration tests are explicitly selected.
Changes:
- Adds an
integrationlabel totest_integrationsocolcon test --ctest-args -LE integrationskips it. - Documents why the label is required (to avoid intermittent shutdown timing failures under unit-test load).
add_launch_test() defaults the launch test's ctest LABELS to "launch_test", which the unit selector (colcon test -LE 'linter|integration') does not exclude. So the launch test ran in the unit phase together with all other unit tests in a single colcon invocation; under that load the node could miss the launch SIGINT shutdown window and get killed with SIGTERM, failing the post-shutdown exit-code check. Override the label to "integration" via set_tests_properties (the repo convention) so it runs only in the integration phase. No code change.
6bba87c to
1e834e4
Compare
mfaferek93
approved these changes
Jun 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test/test_integration.test.pyinros2_medkit_diagnostic_bridgeis a launch test registered withadd_launch_test, which defaults its ctestLABELStolaunch_test. The Pixi unit task runscolcon test --ctest-args -LE 'linter|integration', which does not exclude thelaunch_testlabel, so this launch test ran in the unit phase together with all other unit tests in a single colcon invocation. Under that load the node sometimes did not handle the launch SIGINT within the 5s shutdown window, so launch escalated to SIGTERM and the post-shutdownassertExitCodescheck failed with exit code -15.This overrides the label to
integrationviaset_tests_properties(the pattern used byros2_medkit_fault_managerandros2_medkit_integration_tests), so the test runs in the integration phase and is excluded from the unit phase. The node shutdown code is unchanged.Issue
No separate tracking issue - small CI test-categorization fix.
Type
Testing
ctest -N -L integrationliststest_integrationandctest -VshowsLabels: integration;ctest -N -LE 'linter|integration'no longer lists it. The package unit test (test_diagnostic_bridge) still passes.Checklist